<script>
$('start_modify').addEvent('click', function(){
	$('modify_body').setStyle('display', '');
	//$('show').setStyle('display', 'none');
	$('modify_tr').setStyle('display', 'none');
});
$('close_modify').addEvent('click', function(){
    $('modify_body').setStyle('display', 'none');
    //$('show').setStyle('display', '');
    $('modify_tr').setStyle('display', '');
});
</script>
<div class="tableform">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td><div class="division">
 <{if $detail.statement_status<>'2'}>
        
	        <{if $detail.statement_status=='3'}>
	        <table width='100%' cellspacing="0" cellpadding="0">
	            <tr>
	                <td colspan="4">该单据作废，拒绝结算。</td>
	            </tr>
	        </table>
	        <{else}>
	        <table width='100%' cellspacing="0" cellpadding="0">
	            <tr>
	                <td colspan="4">付款单未结算</td>
	            </tr>
            </table>
	        <{/if}>
        
        <{else}>
<table cellspacing="0" cellpadding="0" border="0">
<tr><th>结算金额：</th><td><{$detail.paid|cur}></td></tr>
<tr><th>结算方式：</th><td><{$detail.payments}></td></tr>
<tr><th>发票号码：</th><td> <{$detail.tax_no}></td></tr>
<tr><th>物流单号：</th><td><{$detail.logi_no}></td></tr>
<tr><th>结算人：</th><td><{$username}></td></tr>
<tr><th>结算备注：</th><td>
<{foreach from=$detail.memo item=items}>
<div id="memo_show">
<b><{$items.op_content|escape:"HTML"}></b> <{$items.op_time}> by <{$items.op_name}>
</div>
<{/foreach}>
</td></tr>
</table>
</div></td>
<td>
<div class="division">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr><th>结算余额：</th><td> <{if !$detail.balance}>
                0
                <{else}>
                <{$detail.balance|cur}>
                <{/if}></td></tr>
<tr><th>银行帐号：</th><td> <{$detail.bank_no}></td></tr>
<tr><th>结算日期：</th><td> <{$detail.statement_time|date_format:"%Y-%m-%d"}></td></tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>

 <div class="tableform" id="modify_body" style="display:none;">
        <div class="division" >
        <form id="detail" action="index.php?<{$env.server.QUERY_STRING}>" method="post" >
        <input type="hidden" name="payment_id" value="<{$detail.payment_id}>"  />
        <table width='100%' cellspacing="0" cellpadding="0">
            <tr>
                <th>结算方式:</th>
                <td>
                <select name="payment">
                    <option value="">请选择</option>
                    <{foreach from=$payment item=item key=key}>
                    <option value="<{$item.id}>" <{if $item.id==$detail.payment}> selected <{/if}> ><{$item.custom_name}></option>
                    <{/foreach}>
                </select>
                </td>
            </tr>
            <tr>
                <th>发票号码:</th>
                <td>
                <{input type="text" name="tax_no" value=$detail.tax_no }>
                </td>
            </tr>
            <tr>
                <th>银行帐号:</th>
                <td>
                <{input type="text" name="bank_no" size="30" value=$detail.bank_no }>
                </td>
            </tr>
            
            <tr>
                <th>物流单号:</th>
                <td>
                <{input type="text" name="logi_no" value=$detail.logi_no }>
                </td>
            </tr>
            
            <tr>
                <th>追加备注:</th>
                <td>
                <{input type="textarea" cols="80" rows="3" name="memo"}>
                </td>
            </tr>
          </table>
          <div style="padding:3px; text-align:center"> <{button class="btn-primary" type="submit" label="保存" }>
                  <{button class="btn-primary" type="button" id="close_modify" label="取消" }></div>
         </div>
         </div>  </form>
<div class="table-action" id="modify_tr"><{button class="btn-primary" id="start_modify" type="button" label="修改" }></div>
          
        <{/if}>
   </div>
   
   